<template>
    <select v-model="optionSelected" @change="changed">
        <option v-bind:key="selector.CODE" v-for="selector  in selectData" :value="selector.CODE" >{{selector.VALUE}}</option>
    </select>
</template>

<script>
    export default {
        name: "BaseSelect",
        props: {
            selectData: {
                type: Array,
                require: true,
            }
        },
        data: function () {
            return {
                optionSelected: 0,
            }
        },
        methods:{
            changed: function () {
                this.$emit('getSelected',this.optionSelected)
            }
        }
    }
</script>

<style scoped>

</style>